/**
 * 查看标准列表
 * @author linfeng
 * @since 2019/12/24
 */
layui.extend({
    zmnExportUtil: '{/}/static/js/zmn.excel.util'
}).define(['index', 'form', 'table', 'laypage', 'layedit','zmnExportUtil','laydate'], function (exports) {
    var $ = layui.$;
    var form = layui.form;
    var layer = layui.layer;
    var table = layui.table;
    var laypage = layui.laypage;
    let layDate = layui.laydate;
    var layedit = layui.layedit;
    var zmnExportUtil =layui.zmnExportUtil;

    layDate.render({
        elem: '#startAndEndDate',
        range: true
    });

    form.render();

    table.init('zmn-table', {
        toolbar: "#zmn-table-tool",
        defaultToolbar: [],
        page: true,
        limit: json.pageSize,
        height: 'full-149',
        done: function () {
            $("div[lay-event='LAYTABLE_EXPORT']").attr('lay-event', 'CUSTOM_EXPORT');
        },
    });

    laypage.render(layui.$.extend({limits:[10, 20, 30, 40, 50,100]},zmnPage.laypageOptions(json)));

    //监听行单击事件（双击事件为：rowDouble）
    table.on('row(zmn-table)', function(obj){
        var data = obj.data;
        //标注选中样式
        obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
        // window.location.href="/standard/record/preview.action?standardId=" + obj.data.standardId + "&flag="+2;
        var url = "/standard/record/preview.action?standardId="+obj.data.standardId+"&flag="+2;
        zmnLayUtil.openTabsPageCustom(parent, url, "详情");
    });

    //对外暴露的接口
    exports('standard_record_checklist_js', {});
});

